import { RouterTextLink, RouterLink } from '@/components/RouterLink'
import BotCard from '@/components/cards/BotCard'
import { ThemedText } from '@/components/ThemedText'
import { Partition } from '@/components/Partition'
import { Fonts } from '@/constants/Themes'
import { Link } from 'expo-router'
import {
  Alert,
  Button,
  Text,
  View,
  StyleSheet,
  TouchableHighlight,
  ScrollView,
  SafeAreaView,
} from 'react-native'
import Header from '@/components/Header'
import { useEffect, useState } from 'react'

export default function Home() {
  const data = [
    {
      title: '咸鱼插件',
      version: '1.1.1',
      type: '游戏插件',
      author: {
        url: 'https://gitee.com/suancaixianyu',
        name: '酸菜咸鱼',
      },
      icon: 'http://q1.qlogo.cn/g?b=qq&nk=3501869534&s=100',
      bot: 'trss-yunzai/miao-yunzai',
    },
    {
      title: '咸鱼工具',
      version: '1.0.0',
      type: '工具插件',
      author: {
        url: 'https://gitee.com/suancaixianyu',
        name: '酸菜咸鱼',
      },
      icon: '',
    },
    {
      title: '咸鱼工具',
      version: '1.0.0',
      type: '工具插件',
      author: {
        url: 'https://gitee.com/suancaixianyu',
        name: '酸菜咸鱼',
      },
      icon: '',
    },
    {
      title: '咸鱼工具',
      version: '1.0.0',
      type: '工具插件',
      author: {
        url: 'https://gitee.com/suancaixianyu',
        name: '酸菜咸鱼',
      },
      icon: '',
    },
    {
      title: '咸鱼工具',
      version: '1.0.0',
      type: '工具插件',
      author: {
        url: 'https://gitee.com/suancaixianyu',
        name: '酸菜咸鱼',
      },
      icon: '',
    },
  ]
  return (
    <>
      <SafeAreaView>
        <ScrollView
          contentContainerStyle={{
            alignItems: 'center',
          }}
        >
          <Header
            title="咸鱼插件统计"
            ishome={true}
          />

          {data.map((item, index) => (
            <BotCard
              key={index}
              title={item.title}
              author={item.author}
              type={item.type}
              version={item.version}
              icon={item.icon}
              bot={item.bot}
            />
          ))}
        </ScrollView>
      </SafeAreaView>
    </>
  )
}
